# Python3_GF_Datetime_Specific_Functions.py
# Create By GF 2023-12-19 14:28

# ----------------------------------------------------------------------------------------------------

# Datetime Function GF Datetime of Previous and Datetime of Current Difference.
def DtmFunc_PrevDt_And_CurrDt_DValue(Prev_Datetime:object, Curr_Datetime:object) -> datetime.timedelta:
    
    """[Required] import datetime"""
    # ----------------------------------------------
    if (type(Prev_Datetime) is str):
        PrevDt = datetime.datetime.strptime(Prev_Datetime, "%Y-%m-%d")
    if (type(Curr_Datetime) is str):
        CurrDt = datetime.datetime.strptime(Curr_Datetime, "%Y-%m-%d")
    # ----------------------------------------------
    if (type(Prev_Datetime) is datetime.datetime):
        PrevDt = Prev_Datetime
    if (type(Curr_Datetime) is datetime.datetime):
        CurrDt = Curr_Datetime
    # ----------------------------------------------
    return CurrDt - PrevDt

# ----------------------------------------------------------------------------------------------------
# EOF
